package com.cenwangkeji.resident;

import android.app.Application;
import android.content.Context;
import android.support.multidex.MultiDex;


import com.lws.basic.utils.common.MyToast;
import com.lws.bugly.Bugly;
import com.tencent.bugly.beta.Beta;

import cn.jpush.android.api.JPushInterface;


/**
 * @松 on 2019/7/18 16:29
 */
public class MyApp extends Application {

    private static Context context;
    @Override
    public void onCreate() {
        super.onCreate();
        context = getApplicationContext();
        MyToast.context = context;
        /*RxJavaPlugins.setErrorHandler(new Consumer<Throwable>() {
            @Override
            public void accept(Throwable throwable) {
                MyLogger.i("Rx异常处理 ");
            }
        });*/
        Bugly.init(getApplicationContext());
        JPushInterface.init(this);

    }

    public static Context getContext() {
        return context;
    }

    @Override
    protected void attachBaseContext(Context base) {
        super.attachBaseContext(base);
        // you must install multiDex whatever tinker is installed!
        MultiDex.install(base);


        // 安装tinker
       // Beta.installTinker();
    }
}
